/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sv.com.globalsolutionslt.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author karinaMelara
 */
@Entity
@Table(name = "estudio_requerido_publicacion", catalog = "bolsadetrabajo", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "EstudioRequeridoPublicacion.findAll", query = "SELECT e FROM EstudioRequeridoPublicacion e"),
    @NamedQuery(name = "EstudioRequeridoPublicacion.findByIdEstudioRequeridoPublicacion", query = "SELECT e FROM EstudioRequeridoPublicacion e WHERE e.idEstudioRequeridoPublicacion = :idEstudioRequeridoPublicacion")})
public class EstudioRequeridoPublicacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_estudio_requerido_publicacion", nullable = false)
    private Integer idEstudioRequeridoPublicacion;
    @JoinColumn(name = "id_publicacion", referencedColumnName = "id_publicacion", nullable = false)
    @ManyToOne(optional = false)
    private Publicacion idPublicacion;
    @JoinColumn(name = "id_tipo_est", referencedColumnName = "id_tipo_est", nullable = false)
    @ManyToOne(optional = false)
    private TipoEstudio idTipoEst;

    public EstudioRequeridoPublicacion() {
    }

    public EstudioRequeridoPublicacion(Integer idEstudioRequeridoPublicacion) {
        this.idEstudioRequeridoPublicacion = idEstudioRequeridoPublicacion;
    }

    public Integer getIdEstudioRequeridoPublicacion() {
        return idEstudioRequeridoPublicacion;
    }

    public void setIdEstudioRequeridoPublicacion(Integer idEstudioRequeridoPublicacion) {
        this.idEstudioRequeridoPublicacion = idEstudioRequeridoPublicacion;
    }

    public Publicacion getIdPublicacion() {
        return idPublicacion;
    }

    public void setIdPublicacion(Publicacion idPublicacion) {
        this.idPublicacion = idPublicacion;
    }

    public TipoEstudio getIdTipoEst() {
        return idTipoEst;
    }

    public void setIdTipoEst(TipoEstudio idTipoEst) {
        this.idTipoEst = idTipoEst;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEstudioRequeridoPublicacion != null ? idEstudioRequeridoPublicacion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EstudioRequeridoPublicacion)) {
            return false;
        }
        EstudioRequeridoPublicacion other = (EstudioRequeridoPublicacion) object;
        if ((this.idEstudioRequeridoPublicacion == null && other.idEstudioRequeridoPublicacion != null) || (this.idEstudioRequeridoPublicacion != null && !this.idEstudioRequeridoPublicacion.equals(other.idEstudioRequeridoPublicacion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sv.com.globalsolutionslt.entidades.EstudioRequeridoPublicacion[ idEstudioRequeridoPublicacion=" + idEstudioRequeridoPublicacion + " ]";
    }
    
}
